<!doctype html>
<head>
	<!-- Basics -->
	
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	
	<title>携程数据管理平台</title>

	<!-- CSS -->
	
	 <style type="text/css">/***** RESET *****/

/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

a {
	text-decoration: none;
}
/* Stylesheet */


/* Imports */


/* Selections */

::selection {
 	color: #fff;
 	text-shadow: none;
 	background: #444;
}

::-moz-selection {
 	color: #fff;
 	text-shadow: none;
 	background: #444;
}

/* Basics */

html, body {
	width: 100%;
	height: 100%;
	/* font-family: "Helvetica Neue", Helvetica, sans-serif; */
	font-family:Microsoft Yahei;
	color: #444;
	-webkit-font-smoothing: antialiased;
	background: #f0f0f0;
	
}

#container {
	position: fixed;
	width: 340px;
	height: 317px;
	top: 50%;
	left: 50%;
	margin-top: -158.5px;
	margin-left: -170px;
	background: #fff;
	border-radius: 3px;
	border: 1px solid #ccc;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
	-webkit-animation-name: bounceIn;
	-webkit-animation-fill-mode: both;
	-webkit-animation-duration: 1s;
	-webkit-animation-iteration-count: 1;
	-webkit-animation-timing-function: linear;
	-moz-animation-name: bounceIn;
	-moz-animation-fill-mode: both;
	-moz-animation-duration: 1s;
	-moz-animation-iteration-count: 1;
	-moz-animation-timing-function: linear;
	animation-name: bounceIn;
	animation-fill-mode: both;
	animation-duration: 1s;
	animation-iteration-count: 1;
	animation-timing-function: linear;
}

form {
	margin: 0 auto;
	margin-top: 20px;
}

label {
	color: #555;
	display: inline-block;
	margin-left: 18px;
	padding-top: 10px;
	font-size: 14px;
}

p a {
	font-size: 11px;
	color: #aaa;
	float: right;
	margin-top: -13px;
	margin-right: 20px;
	-webkit-transition: all .4s ease;
	-moz-transition: all .4s ease;
	transition: all .4s ease;
}

p a:hover {
	color: #555;
}

input {
	font-family: "Helvetica Neue", Helvetica, sans-serif;
	font-size: 14px;
	outline: none;
}

input {
	color: #777;
	padding-left: 10px;
	margin: 10px;
	margin-top: 12px;
	margin-left: 18px;
	width: 290px;
	height: 35px;
	border: 1px solid #c7d0d2;
	border-radius: 2px;
	/*box-shadow: inset 0 1.5px 3px rgba(190, 190, 190, .4), 0 0 0 5px #f5f7f8;*/
	-webkit-transition: all .4s ease;
	-moz-transition: all .4s ease;
	transition: all .4s ease;
}

input:hover{
	border: 1px solid #b6bfc0;
	box-shadow: inset 0 1.5px 3px rgba(190, 190, 190, .7), 0 0 0 5px #f5f7f8;
}

input:focus{
	border: 1px solid #a8c9e4;
	box-shadow: inset 0 1.5px 3px rgba(190, 190, 190, .4), 0 0 0 5px #e6f2f9;
}

#lower {text-align: center;
	background: #ecf2f5;
	width: 100%;
	height: 69px;
	margin-top: 19px;
	box-shadow: inset 0 1px 1px #fff;
	border-top: 1px solid #ccc;
	border-bottom-right-radius: 3px;
	border-bottom-left-radius: 3px;
}

input[type=checkbox] {
	margin-left: 20px;
	margin-top: 30px;
}

.check {
	margin-left: 3px;
	font-size: 11px;
	color: #444;
	text-shadow: 0 1px 0 #fff;
}

button#button{
	/* float: right; */
margin-right: auto;
margin-top: 20px;
/* margin: 0 auto; */
width: 200px;
	height: 30px;
	font-size: 14px;
	font-weight: bold;
	color: #fff;
	background-color: #acd6ef; /*IE fallback*/
	background-image: -webkit-gradient(linear, left top, left bottom, from(#acd6ef), to(#6ec2e8));
	background-image: -moz-linear-gradient(top left 90deg, #acd6ef 0%, #6ec2e8 100%);
	background-image: linear-gradient(top left 90deg, #acd6ef 0%, #6ec2e8 100%);
	border-radius: 30px;
	border: 1px solid #66add6;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .5);
	cursor: pointer;
}

input[type=submit]:hover {
	background-image: -webkit-gradient(linear, left top, left bottom, from(#b6e2ff), to(#6ec2e8));
	background-image: -moz-linear-gradient(top left 90deg, #b6e2ff 0%, #6ec2e8 100%);
	background-image: linear-gradient(top left 90deg, #b6e2ff 0%, #6ec2e8 100%);
}

input[type=submit]:active {
	background-image: -webkit-gradient(linear, left top, left bottom, from(#6ec2e8), to(#b6e2ff));
	background-image: -moz-linear-gradient(top left 90deg, #6ec2e8 0%, #b6e2ff 100%);
	background-image: linear-gradient(top left 90deg, #6ec2e8 0%, #b6e2ff 100%);
}

h1 {
text-align: center;
margin-top: 20px;
}

input.has-error:hover, input.has-error,input.has-error:focus {
border-color: #a94442;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
}
input.has-success, input.has-success,input.has-success:focus {
border-color: #3c763d;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
}
</style>
	
</head>

	<!-- Main HTML -->
	
<body>
	
	<!-- Begin Page Content -->
	
	<div id="container">
			<h1>宙斯登录</h1>
			<form action="login.do" method="post" onSubmit="return false;">
				
				<label for="username">用户名:</label>
				
				<input type="text" id="username" name="username" data-reg="noempty">
				
				<label for="password">密码:</label>
				
				
				<input type="password" id="password" name="password" data-reg="noempty">
				
				<div id="lower">
			
					
					<button id="button">Login</button>
				
				</div><!--/ lower-->
			
			</form>
			
		</div><!--/ container-->
	
	
	<!-- End Page Content -->
	
</body>

</html>
<script src="js/jquery-1.9.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
		     	function validate(event){
	     		  var target =$(event.target),
                  reg=target.attr("data-reg"),val = target.val(),status=true,disabled = false;
	              if(reg){
	                switch(reg){
	                  case 'email':
	                    if(!/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/.test(val)){
	                      status = false;
	                    }
	                    break;
	                    case 'noempty':
	                    if(val=='' || /^\s+$/.test(val)){
	                      status = false;
	                    }
	                    break;
	                    case 'number':
	                    if(val=='' || !/^\d+$/.test(val)){
	                      status = false;
	                    }
	                    break;
	                }
                }
                if(!status){
                	target.removeClass('has-success').addClass('has-error');
                }else{
                	target.removeClass('has-error').addClass('has-success');
                }
               
	     	}
	$("#button").click(function(){
		var username = $("#username").val();
		var password = $("#password").val();
		if(username==""){
			 $("#username").addClass("has-error");
			 return false;
		}
		if(password==""){
			 $("#password").addClass("has-error");
			 return false;
		}
		$.ajax({url:"login.do",async:false,data:{
			username:username,password:password
		},type:"post",

			error: function(response){ 
				alert("请求发送失败");
                      
            },
            success: function(response){ //console.log(response);
            	if(response=="null"){
            		alert("用户名不存在");
            	}else if(response=="error"){
            		alert("账户错误");
            	}else{
            		window.location.href='/zeus-web';
            	}
            }
		});
	});
	$("#container input,textarea,select").on('input propertychange',function(event){
        validate(event);
    });
</script>
	
	
	
	
	
		
	